package com.gitee.minimalismstyle.fresh.simple.api.option

import com.gitee.minimalismstyle.fresh.common.core.domain.Simple
import com.gitee.minimalismstyle.fresh.common.core.option.Options
import com.gitee.minimalismstyle.fresh.simple.api.service.SimpleSqlService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component

@Component
class SqlOptions : Options {
    @Autowired
    private lateinit var simpleSqlService: SimpleSqlService

    override fun get(param: Any): List<Simple> {
        return simpleSqlService.executeSelectByCode(param.toString(), Simple()).get()
    }
}